package com.jule.miaozhuapc.webSocket.server;

public class Test implements Runnable{

	public static void main(String[] args) throws Exception {
		StringBuffer str = new StringBuffer();
		for(byte b : new byte[]{ (byte) 0xaa, 0x05, 0x70, 0x33, 0x04, 0x01, 0x43, (byte) 0xdd }) {
			str.append(String.format("%02x", b));
			str.append(" ");
		}
		System.out.println("收到主板数据：["+str+"]");
	}

	@Override
	public void run() {
		try {
			Thread.sleep(2000);
			//WawaServer.sendCmd(1001, "RESET");
			//Thread.sleep(2000);
			//int num = (int) (System.currentTimeMillis() % 2);
			//WawaServer.sendCmd(1001, "COURSE"+num);
			/*
			Thread.sleep(2000);
			WawaServer.sendCmd(1001, "RIGHT");
			Thread.sleep(1000);
			WawaServer.sendCmd(1001, "RIGHTSTOP");
			
			Thread.sleep(2000);
			WawaServer.sendCmd(1001, "LEFT");
			Thread.sleep(1000);
			WawaServer.sendCmd(1001, "LEFTSTOP");
			
			Thread.sleep(2000);
			WawaServer.sendCmd(1001, "UP");
			Thread.sleep(1000);
			WawaServer.sendCmd(1001, "UPSTOP");
			
			Thread.sleep(2000);
			WawaServer.sendCmd(1001, "DOWN");
			Thread.sleep(1000);
			WawaServer.sendCmd(1001, "DOWNSTOP");
			
			Thread.sleep(2000);
			WawaServer.sendCmd(1001, "RIGHT");
			Thread.sleep(1000);
			WawaServer.sendCmd(1001, "RIGHTSTOP");
			
			Thread.sleep(3000);
			WawaServer.sendCmd(1001, "CATCH");*/
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		
	}
	
}
